#define EXT_INT_RISING_EDGE		MCUCR	|=	0b00001111
#define EXT_INT_ENA				GICR	|=	0b11000000
#define EXT_INT_DIS				GICR	&=	~0b11000000
#define EXT_INT_PIN1			PD2
#define EXT_INT_PIN2			PD3

#define TIMER_ON				TCCR0B 	|=	0x05
#define TIMER_OFF				TCCR0B  &= 	~0x05
#define TIMER_OVERFLOW_ENA		TIMSK	|=	_BV(TOIE0)
#define TIMER_OVERFLOW_DIS		TIMSK	&= ~_BV(TOIE0)

#define PWM1_WAVE_FORM_1		TCCR1A	|= 0b11110001 //fast PWM 8bit
#define PWM1_WAVE_FORM_2		TCCR1B	|= 0b00001000 
#define START_PWM1				TCCR1B	|= _BV(CS10)
#define PWM2_WAVE_FORM			TCCR2	|= 0b01111000 //fast PWM
#define START_PWM2				TCCR2	|= _BV(CS20)
#define SET_PWM_OUT				DDRB	=	_BV(PB1)|_BV(PB2)
#define SET_MOTOR			DDRC = _BV(PC1)|_BV(PC0) | _BV(PC3)|_BV(PC2)
//#define SET_MOTOR_L			DDRC = _BV(PC1)|_BV(PC0) 
//#define SET_MOTOR_R			DDRC = _BV(PC3)|_BV(PC2)

#define TURN_FAST_L			PORTC = 0b00001001
#define TURN_F_L			PORTC = 0b00000001
#define TURN_B_L			PORTC = 0b00001000
#define TURN_FAST_R			PORTC = 0b00000110
#define TURN_F_R			PORTC = 0b00000100
#define TURN_B_R			PORTC = 0b00000010
#define FORWARD				PORTC = 0b00000101
#define BACKWARD			PORTC = 0b00001010
#define STOP				PORTC = 0b00000000

